package com.vietnam.power.persitence;

import java.io.Serializable;

import javax.persistence.*;

import com.vietnam.power.domain.Root;
import com.vietnam.power.domain.UpdatableRoot;

import java.util.Date;


/**
 * The persistent class for the email_notification database table.
 * 
 */
@Entity
@Table(name="email_notification")
public class EmailNotification implements Serializable,UpdatableRoot,Root {
	private static final long serialVersionUID = 1L;
	private int id;
	private Date createdDate;
	private Date notifiedDate;
	private boolean status;
	private Date updatedDate;
	private MessageInfo messageInfo;

	public EmailNotification() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}


	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="created_date")
	public Date getCreatedDate() {
		return this.createdDate;
	}

	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}


	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="notified_date")
	public Date getNotifiedDate() {
		return this.notifiedDate;
	}

	public void setNotifiedDate(Date notifiedDate) {
		this.notifiedDate = notifiedDate;
	}


	public boolean getStatus() {
		return this.status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}


	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="updated_date")
	public Date getUpdatedDate() {
		return this.updatedDate;
	}

	public void setUpdatedDate(Date updatedDate) {
		this.updatedDate = updatedDate;
	}


	//bi-directional many-to-one association to MessageInfo
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="message_info_id")
	public MessageInfo getMessageInfo() {
		return this.messageInfo;
	}

	public void setMessageInfo(MessageInfo messageInfo) {
		this.messageInfo = messageInfo;
	}

}